<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%@include file="../common/top.jsp"%>
	<div>
		<table class="table table-hover table-bordered">
			<caption>
				<span class="label pull-left"
					style="font-family: white; font-size: 16px"><span
					class="local" data-local="emp_title">员工管理列表：</span></span>
			</caption>
			<thead>
				<tr>
					<td><span class="local" data-local="emp_tbl_id">ID</span></td>
					<td><span class="local" data-local="emp_tbl_username">用户名</span></td>
					<td><span class="local" data-local="emp_tbl_realname">真实姓名</span></td>
					<td><span class="local" data-local="emp_tbl_phone">联系方式</span></td>
					<td><span class="local" data-local="emp_tbl_hiredate">入职日期</span></td>
					<td><span class="local" data-local="emp_tbl_address">家庭住址</span></td>
					<td><span class="local" data-local="emp_tbl_hobby">爱好</span></td>
					<td><span class="local" data-local="emp_tbl_operator">操作</span></td>
				</tr>
			</thead>
			<tbody>
				<!-- c:forEach items="leaveBillList" var="leaveBill"
			报错：javax.el.PropertyNotFoundException: Property 'id' not found on type java.lang.String
			 -->
				<!-- 改为异步调用 -->
				<c:forEach items="${result.data }" var="employee">
					<tr>
						<td>${employee.id }</td>
						<td>${employee.name }</td>
						<td>${employee.realName }</td>
						<td>${employee.phone }</td>
						<td><fmt:formatDate value="${employee.hiredate }"
								pattern="yyyy-MM-dd HH:mm:ss" /></td>
						<td>${employee.address }</td>
						<td>${employee.hobby }</td>
						<td><a href="javascript:void(0);"
							onclick="deleteEmp(${employee.id })"><span class="local"
								data-local="emp_tbl_oper_del">删除</span></a>&nbsp; <a
							href="goto_update_emp.do?id=${employee.id }"><span
								class="local" data-local="emp_tbl_oper_update">修改</span></a>&nbsp; <a
							href="javascript:void(0);" onclick="showDetail(${employee.id })"><span
								class="local" data-local="emp_tbl_oper_detail">详情</span></a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>


	<div>
		<!-- 模态框（Modal） -->
		<div class="modal fade" id="empDetailModal" tabindex="-1"
			role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog" style="width: 900px">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel"><span
								class="local" data-local="emp_detail_title">员工明细</span></h4>
					</div>
					<div class="modal-body">
						<table class="table">
							<!-- <caption style="background-color: #428BCA;">
								<span class="label pull-left"
									style="font-family: white; font-size: 16px">部署流程</span>
							</caption> -->
							<tr>
								<td><span
								class="local" data-local="emp_detail_id">ID</span></td>
								<td><span
								class="local" data-local="emp_detail_email">邮件</span></td>
								<td><span
								class="local" data-local="emp_detail_role">角色</span></td>
								<td><span
								class="local" data-local="emp_detail_manager">管理者Id</span></td>
								<td><span
								class="local" data-local="emp_detail_sex">性别</span></td>
								<td><span
								class="local" data-local="emp_detail_idcard">身份证</span></td>
								<td><span
								class="local" data-local="emp_detail_salary">薪水</span></td>
								<td><span
								class="local" data-local="emp_detail_word_desc">工作描述</span></td>
							</tr>
							<tr>
								<td id="id"></td>
								<td id="email"></td>
								<td id="role"></td>
								<td id="manager_id"></td>
								<td id="sex"></td>
								<td id="idcard"></td>
								<td id="salary"></td>
								<td id="work_desc"></td>
							</tr>
						</table>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-primary" data-dismiss="modal"><span
								class="local" data-local="emp_btn_ok">确认</span>
						</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
	</div>
	<script type="text/javascript" src="${basePath }static/js/employee.js"></script>
</body>
</html>